<?php
namespace app\validate;

use think\Validate;

class CheckFlex extends Validate
{

    protected $rule =   [
        'title'  => 'require|length:1,50',
        'open_up'  => 'require|number',
        'range'  => 'require|number',
        'time'  => 'require',
        'background'  => 'require',
        'icon'  => 'require',
        //'number'  => 'require|number|length:1,3',
    ];

    protected $message  =   [
        'title.require' => '请填写标题！',
        'title.length' => '标题在1-50个字符之间！',
        'open_up.require' => '请选择开放状态！',
        'open_up.number' => '开放状态为数字！',
        'range.require' => '请选择调研范围！',
        'range.number' => '调研范围为数字！',
        'time.require' => '请选择调研日期！',
        'background.require' => '请选择或上传背景主题！',
        'icon.require' => '请选择或上传背景icon！',
        //'number.require' => '请选择或输入open flex选课数！',
        //'number.number' => 'open flex选课数为数字！',
        //'number.length' => 'open flex选课数在1-999之前！',
    ];

}